package com.yjhb.android.sbz.v2.dialog

import android.app.Activity
import com.yjhb.android.sbz.Conf
import com.yjhb.android.sbz.R
import com.yjhb.android.sbz.tool.Tool
import com.jojo.android.zxlib.base.BaseDialog
import com.jojo.android.zxlib.tool.ZxSPTool
import kotlinx.android.synthetic.main.dialog_new_user.*


/**
 *  创建者 zx
 *  创建时间 2021/5/24 10:13
 */
class NewUserDialog(activity: Activity) : BaseDialog(activity) {


    override fun init() {
        close_iv?.setOnClickListener { dismiss() }
        new_user_must_tv?.setOnClickListener {
            Tool.startWebActivity(activity, "http://www.shangbangzuan.com:81/new_user_see.html", "新人必看")
        }
        publish_task_course_tv?.setOnClickListener {
            Tool.startWebActivity(activity, "http://www.shangbangzuan.com:81/task_learn.html", "看发任务教程")
        }
        setOnDismissListener {
            if (checkbox?.isChecked!!) {
                ZxSPTool.setParam(activity.application, Conf.SP_NEW_USER_SHOW,
                        3)
            }
        }
    }

    override fun getLayoutId() = R.layout.dialog_new_user


}